/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.tb_cost.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.ToolsUtil;

/**
 * 运输中审核-费用Entity
 * @author ZhangYangZe
 * @version 2017-06-13
 */
public class TbCost extends DataEntity<TbCost> {
	
	private static final long serialVersionUID = 1L;
	
	
	
	private String waybillId;		// 运单ID
	private Integer driverId;		// 司机ID
	private String type;		// 费用类型0配件费1维修费2过路费3协调费4住宿费5保养费6其他
	private String parst;		// 项目
	private Double price;		// 单价
	private Integer number;		// 数量
	private Double money;		// 金额
	private Date dateTime;		// date_time
	private String state;		// 审核0待审核1通过2不通过
	private String fallContext;		//审核不通过原因
	private String photoBig;		// 照片
	private String photoSmall;		// 照片
	private Date beginCreateDate;		// 开始 创建时间
	private Date endCreateDate;		// 结束 创建时间
	private String[] bigPhotoArray;
	private String[] smallPhotoArray;
	public TbCost() {
		super();
		this.bigPhotoArray = ToolsUtil.strToStrArray(photoBig);
		this.smallPhotoArray = ToolsUtil.strToStrArray(photoSmall);
	}

	public TbCost(String id){
		super(id);
	}

	@Length(min=1, max=50, message="运单ID长度必须介于 1 和 50 之间")
	public String getWaybillId() {
		return waybillId;
	}

	public void setWaybillId(String waybillId) {
		this.waybillId = waybillId;
	}
	
	@Length(min=1, max=50, message="司机ID长度必须介于 1 和 50 之间")
	public Integer getDriverId() {
		return driverId;
	}

	public void setDriverId(Integer driverId) {
		this.driverId = driverId;
	}
	
	@Length(min=1, max=2, message="费用类型0配件费1维修费2过路费3协调费4住宿费5保养费6其他长度必须介于 1 和 2 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=0, max=255, message="项目长度必须介于 0 和 255 之间")
	public String getParst() {
		return parst;
	}

	public void setParst(String parst) {
		this.parst = parst;
	}
	
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}
	
	@Length(min=0, max=20, message="数量长度必须介于 0 和 20 之间")
	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}
	
	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="date_time不能为空")
	public Date getDateTime() {
		return dateTime;
	}

	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}
	
	@Length(min=0, max=255, message="审核0待审核1通过2不通过长度必须介于 0 和 255 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	public String getFallContext() {
		return fallContext;
	}

	public void setFallContext(String fallContext) {
		this.fallContext = fallContext;
	}

	@Length(min=1, max=1500, message="照片长度必须介于 1 和 1500 之间")
	public String getPhotoBig() {
		return photoBig;
	}

	public void setPhotoBig(String photoBig) {
		this.photoBig = photoBig;
	}
	
	@Length(min=1, max=1500, message="照片长度必须介于 1 和 1500 之间")
	public String getPhotoSmall() {
		return photoSmall;
	}

	public void setPhotoSmall(String photoSmall) {
		this.photoSmall = photoSmall;
	}
	
	public Date getBeginCreateDate() {
		return beginCreateDate;
	}

	public void setBeginCreateDate(Date beginCreateDate) {
		this.beginCreateDate = beginCreateDate;
	}
	
	public Date getEndCreateDate() {
		return endCreateDate;
	}

	public void setEndCreateDate(Date endCreateDate) {
		this.endCreateDate = endCreateDate;
	}

	public String[] getBigPhotoArray() {
		return bigPhotoArray;
	}

	public void setBigPhotoArray(String[] bigPhotoArray) {
		this.bigPhotoArray = ToolsUtil.strToStrArray(getPhotoBig());
	}

	public String[] getSmallPhotoArray() {
		return smallPhotoArray;
	}

	public void setSmallPhotoArray() {
		this.smallPhotoArray = ToolsUtil.strToStrArray(getPhotoSmall());
	}

	
		
}